<template>
	<view>
		<search-component ref="search_view" :tabList="tabList" v-model="currentClass" @searchConfirm="searchConfirm">
		</search-component>
		<view class="video_list">
			<view class="video_list_item" v-for="(item, index) in dataList" :key="index" @click="onClick(item.pk_id)">
				<image class="video_list_item-img" :src="$formatImg(item.img)" mode=""></image>
				<view class="cont_title u-line-1">{{ item.name }}</view>
				<view class="prcie_how ">
					<view class="video-price spac u-line-1">￥{{ item.price }}</view>
					<view class="video-how spac  u-line-1">热度：{{ item.view }}</view>
				</view>
			</view>
		</view>
		<sww-load-more :params="dataListParams"></sww-load-more>
		<sww-login></sww-login>
	</view>
</template>

<script>
	import {
		comSearch
	} from './mixin/comSearch.js';
	import searchComponent from './mixin/searchComponent.vue';
	export default {
		mixins: [comSearch],
		data() {
			return {
				parentClass: -1, // 上级分类
				currentClass: -1, // 当前搜索的分类id
				classType: 5, // 分类类型
				searchClasskey: 'type',
				listApi: 'GetVideoList',
				title: '视频中心'
			};
		},
		components: {
			'search-component': searchComponent
		},
		methods:{
			filterParameter () {
				if(this.vuex_user.level){
					this.parameter.gobal_buyer = this.vuex_user.level
				}
			},
		}
	};
</script>
<style scoped lang="scss">
	.video_list {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding: 10rpx 24rpx 0;

		.video_list_item {
			width: calc(100% / 2 - 12rpx);
			height: 100%;
			border-radius: 10rpx;
			padding-bottom: 30rpx;
		}

		.video_list_item-img {
			width: 100%;
			height: 200rpx;
			border-radius: 10rpx;
		}

		.cont_title {
			font-size: 28rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #333333;
			margin: 10rpx 0;
		}

		.video-price {
			color: #f82424;
			font-size: 28rpx;
		}

		.prcie_how {
			display: flex;
			justify-content: space-between;
			font-size: 20rpx;
			align-items: center;
		}

		.spac {
			width: calc(50% - 20rpx);
		}

		.video-how {
			text-align: right;
			color: #999;
		}
	}
</style>
